const express = require('express');
// 创建一个 服务 
const app = express();

const middleware1 = (req,res,next) => {
  console.log('1');
  next();
  console.log('1-1');
}
const middleware2 = (req,res,next) => {
  console.log('2');
  next();
  console.log('2-2');
}
const middleware3 = (req,res,next) => {
  console.log('3');
  next();
  console.log('3-3');
}
// 使用中间件
app.use(middleware1);
app.use(middleware2);
app.use(middleware3);
app.get('/a', (req,res)=>{
  res.send('a路由');
})

app.listen(9527, () => {
  console.log('start at port 9527');
})
// nodemon
